<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/FCKEdit" prefix="fck"%>
<%@ include file="/jsp/admintop.jsp" %>
<%@ include file="/jsp/jscommom.jsp"%>
<%@ include file="/jsp/viewtop.jsp"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>新闻修改</title>
		<link href="/css/login.css" rel="stylesheet" type="text/css" />
	</head>
	<script type="text/javascript">
function domethod(flag){
if(document.all.newsTitle.value==""){
alert("新闻标题不能为空!");
return;
}

if(document.all.infoSourse.value==""){
alert("信息来源不能为空!");
return;
}

var fckconfig = document.getElementById("newsContent");
var str=FCKeditorAPI.GetInstance('newsContent').GetXHTML(fckconfig.FormatOutput);

    if(str==""){
    alert("对不起,新闻内容不能为空!");
    return false;
    }

document.all.method.value=flag;
window.document.forms[0].submit();
document.all.method.value="";
}

</script>
	<body height="1000">
		<html:form action="/system/admin/news/editnewsissue" method="post">
			<html:hidden property="method" />
			<html:hidden property="newsId"/>
			<html:hidden property="tempNewsContent"/>
			<div align="center">
				<table width="880" height="80%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
					<tr>
						<td class="titlebg" colspan="4">
							新闻发布
						</td>
					</tr>
					<tr>
						<td class="mtdtitle1">
							标题
						</td>
						<td colspan="3" class="mtdtextleft">
							<html:text property="newsTitle" size="50" styleClass="input1"></html:text>
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							类型
						</td>

						<td class="mtdtextleft">
							<html:select property="newsType">
								<html:option value="0">
									最新动态
								</html:option>
								<html:option value="1">
									职场攻略
								</html:option>
								<html:option value="2">
									传媒博览
								</html:option>
								<html:option value="3">
									政策法规
								</html:option>
								<html:option value="5">
									现场招聘
								</html:option>
								<html:option value="19">
									毕业生频道
								</html:option>
								<html:option value="20">
									网站注释
								</html:option>
								<html:option value="21">
									走马灯
								</html:option>
							</html:select>
						</td>

						<td class="mtdtitle1">
							信息来源
						</td>
						<td class="mtdtextleft">
							<html:text property="infoSourse" styleClass="input1"></html:text>
						</td>
					</tr>

					<tr>
						<td colspan="4" height="100%" class="mtdtextleft">
							<fck:editor id="newsContent" basePath="/" height="100%"
								skinPath="/editor/skins/default/" toolbarSet="Default"
								imageBrowserURL="/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
								linkBrowserURL="/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
								flashBrowserURL="/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
								imageUploadURL="/editor/filemanager/upload/simpleuploader?Type=Image"
								linkUploadURL="/editor/filemanager/upload/simpleuploader?Type=File"
								flashUploadURL="/editor/filemanager/upload/simpleuploader?Type=Flash">
							</fck:editor>
							<script type="text/javascript">
							document.getElementById("newsContent").innerText=document.all.tempNewsContent.value;
							</script>
						</td>
					</tr>

					<tr >
						<td colspan="4" class="mtdtitle1">
							<input type="button"  onclick="domethod('edit')"
								value="提交" class="tbutton" />
							<input type="button"  onclick="domethod('del')"
								value="删除" class="tbutton" />
						</td>
					</tr>
				</table>
			</div>
		</html:form>
	</body>
</html>
